﻿using System.Windows.Controls;

namespace Manager.gui
{
	public partial class PanelInformation : UserControl
	{
		private MadiManager manager;
		public PanelInformation()
		{
			InitializeComponent();
		}
		public void updateFields()
		{
			manager = MadiManager.get();
			textBoxAutor.Text = manager.data.Author;
			textBoxTitulo.Text = manager.data.Title;
			textBoxNombreArchivo.Text = manager.CurrentFile;
		}
		private void textBoxTitulo_TextChanged(object sender, TextChangedEventArgs e)
		{
			manager.data.Title = textBoxTitulo.Text;
			manager.isModified = true;
		}

		private void textBoxAutor_TextChanged(object sender, TextChangedEventArgs e)
		{
			manager.data.Author = textBoxAutor.Text;
			manager.isModified = true;
		}

	}
}
